using System;
using System.Collections.Generic;
using System.Text;
using NBusiness.CodeDom.Services;

namespace NBusiness.CodeDom
{
    [Serializable]
	public abstract class EntityValidation : EntityRule
	{
        public IValidatable Validatable { get; set; }

        private List<EntityValidationArgument> _arguments = new List<EntityValidationArgument>();
        public List<EntityValidationArgument> Arguments
		{
			get { return _arguments; }
		}

		public override string ToString()
		{
            return string.Format("validate {0} {1} {2}",
                Validatable,
				Name,
                _arguments);
		}
    }
}
